<?php /* Smarty version 2.6.18, created on 2012-05-16 22:29:21
         compiled from ajax/account-basic-religion.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'html_options', 'ajax/account-basic-religion.tpl', 10, false),array('modifier', 'escape', 'ajax/account-basic-religion.tpl', 19, false),)), $this); ?>
<form method="post" id="frmReligion" name="frmReligion" action="<?php echo @HOST_VFRIEND; ?>
account/basicsave" enctype="multipart/form-data">
	<input type="hidden" name="ptsave" id="ptsave" value="<?php echo $this->_tpl_vars['intType']; ?>
" />
	<div class="editForm">    	
        <div class="userInput">
        	<label>Tôn giáo:</label>
            <div class="pReligion">
                <select class="select" id="preligion" name="preligion" <?php if ($this->_tpl_vars['objUser']->religion == 0): ?>title="Chọn"<?php else: ?>title="<?php echo $this->_tpl_vars['objUser']->religion_name; ?>
"<?php endif; ?> onchange="showOther(this.value)">
                	<option value="">Chọn</option>
                    <?php if (isset ( $_SESSION['st_religion'] ) && $_SESSION['st_religion'] == -1): ?>
                    	<?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['arrReligion']), $this);?>
                        
                        <option value="-1" selected="selected">Khác</option>
                    <?php else: ?>
                		<?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['arrReligion'],'selected' => $this->_tpl_vars['objUser']->religion), $this);?>

                        <option value="-1">Khác</option>
                    <?php endif; ?>
                </select>                
           	</div>
            <div class="secOther" <?php if (isset ( $_SESSION['st_religion'] ) && $_SESSION['st_religion'] == -1): ?>style=""<?php else: ?>style="display:none;"<?php endif; ?>>
            	<input type="text" name="preligion_other" id="preligion_other" maxlength="150" value="<?php if (isset ( $_SESSION['st_religion_other'] )): ?><?php echo ((is_array($_tmp=$_SESSION['st_religion_other'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
<?php endif; ?>" class="text clearIt tMargin10" />
            </div>
        </div>
        <div class="userInput">
        	<input type="submit" value="Thay đổi" class="btn" />
            <input type="button" value="Hủy" class="btn" onclick="javascript:basicClose('<?php echo $this->_tpl_vars['strView']; ?>
','<?php echo $this->_tpl_vars['strEdit']; ?>
')" />
        </div>
    </div>
</form>
<script type="text/javascript" language="javascript" src="<?php echo @HOST_STATICS; ?>
js/library/init.js"></script>
<?php echo '
<script type="text/javascript" language="javascript">
	showOther = function(intValue) {
		if(intValue == -1) {
			$(\'.secOther\').show();
		}
		else {
			$(\'.secOther\').hide();
		}
	}	
	$(document).ready(function(){		
		$("#frmReligion").validate({							
			errorClass		: \'errorMessage\',
			errorElement	: \'span\',
			onfocusout		: false,
			onkeyup			: false,
			rules: {	
				preligion:{
					required	: true
				},
				preligion_other: {
					required	: true,
					minlength	: 5
				}
				
			},
			messages: {	
				preligion:{
					required	: religion_required
				},
				preligion_other: {
					required	: religion_other_required,
					minlength	: religion_other_minlength
				}
			},		
			errorPlacement: function(label, element) {			
				var id = element.attr(\'id\');			
				label.insertAfter($(\'#\' + id));			
			},
			submitHandler: function(form) {				
				form.submit();
			}
		});	
	});
</script>
'; ?>